package com.github.admin.edu.oauth.server.api.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Created by IntelliJ IDEA.
 * user:wangj
 * date:2018/8/12
 * Time: 9:16
 */
public class TSysRole {


    private Long id;

    private String name;

    private String code;

    private Long state;

    private Long type;

    @JsonIgnore
    private String stateName;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getState() {

        return state;
    }

    public void setState(Long state) {
        if(null!=state&&1==state){
            this.stateName="启用";
        }else {
            this.stateName="禁用";
        }
        this.state = state;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public String getStateName() {

        return stateName;
    }

    public void setStateName(String stateName) {

        this.stateName = stateName;
    }
}
